<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>角色管理-WeAdmin Frame型后台管理系统-WeAdmin 1.0</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<link rel="stylesheet" href="__STATIC__/admin/static/css/font.css">
		<link rel="stylesheet" href="__STATIC__/admin/static/css/weadmin.css">
		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
	      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
	      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
	    <![endif]-->
	    <script type="text/javascript" src="__STATIC__/admin/static/js/jquery3.2.1.min.js"></script>
	</head>

	<body>
		<div class="weadmin-nav">
			<span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">管理员管理</a>
        <a>
          <cite>角色管理</cite></a>
      </span>
			<a class="layui-btn layui-btn-sm" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
				<i class="layui-icon" style="line-height:30px">ဂ</i></a>
		</div>
		<div class="weadmin-body">
			<div class="layui-row">
				<form class="layui-form layui-col-md12 we-search" method="post">
					<div class="layui-inline">
						<input type="text" name="username" placeholder="请输入用户名" autocomplete="off" class="layui-input">
					</div>
					<button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
				</form>
			</div>
			<div class="weadmin-block">
				<button class="layui-btn layui-btn-danger" onclick="delAll('{:url(\'admin/role/del\')}')"><i class="layui-icon"></i>批量删除</button>
				<button class="layui-btn" onclick="WeAdminShow('添加用户','{:url(\'admin/role/add\')}')"><i class="layui-icon"></i>添加</button>
			</div>
			<table class="layui-table">
				<thead>
					<tr>
						<th>
							<div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
						</th>
						<th>ID</th>
						<th>角色名</th>
						<th>拥有权限规则</th>
						<th>描述</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					{foreach $info as $v}
					<tr>
						<td>
							<div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id="{$v['role_id']}"><i class="layui-icon">&#xe605;</i></div>
						</td>
						<td>{$v['role_id']}</td>
						<td>{$v['role_name']}</td>
						<td>
							<div class='deti' style="white-space:nowrap;text-overflow:ellipsis;overflow:hidden; width:200px">{foreach $list as $vo}{if $v['role_id']==$vo['role_id']}{$vo['title']},{/if}{/foreach}</div>
						</td>
						<td>{$v['role_desc']}</td>
						<td class="td-manage">
							<a title="编辑" onclick="WeAdminShow('编辑','{:url(\'admin/role/edit\',[\'role_id\'=>$v[\'role_id\']])}')" href="javascript:;">
								<i class="layui-icon">&#xe642;</i>
							</a>
							<a title="删除" onclick="member_del({$v['role_id']},'{:url(\'admin/role/del\')}')" href="javascript:;">
								<i class="layui-icon">&#xe640;</i>
							</a>
						</td>
					</tr>
					{/foreach}
				</tbody>
			</table>
			<div class="page">
				<div>
					{$info|raw}
				</div>
			</div>
		</div>
		<script src="__STATIC__/admin/lib/layui/layui.js" charset="utf-8"></script>
		<script src="__STATIC__/admin/static/js/eleDel.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$('.deti').mouseover(function(){
				con=$(this).html();
				con=con.substr(0,con.length-1);
				$(this).attr('title',con);
			})
		</script>
	</body>

</html>